package com.gitee.wsl.compose.base

import androidx.compose.runtime.Composable
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.platform.WindowInfo
import androidx.compose.ui.unit.dp

enum class WindowSizeType { Phones, SmallTablets, BigTablets, DesktopOne, DesktopTwo }

//@Composable
//@OptIn(ExperimentalComposeUiApi::class)
//fun WindowInfo.getWindowSizeType(): WindowSizeType {
//    val width = containerSize.toDpSize().width
//    return when {
//        width< 0.dp -> throw IllegalArgumentException("Dp value cannot be negative")
//        width< 600.dp -> WindowSizeType.Phones
//        width< 960.dp -> WindowSizeType.SmallTablets
//        width< 1024.dp -> WindowSizeType.BigTablets
//        width< 1366.dp -> WindowSizeType.DesktopOne
//        else -> WindowSizeType.DesktopTwo
//    }
//}
